package javabase.schoolwork.day6_6;

/**
 * @author fance
 * @date 18-6-6 下午3:30
 */
class InfoV<T,V> {
    private T v1;
    private V v2;

    public InfoV(T v1, V v2) {
        this.v1 = v1;
        this.v2 = v2;
    }

    public T getV1() {
        return v1;
    }

    public V getV2() {
        return v2;
    }

    @Override
    public String toString() {
        return "InfoV{" +
                "v1=" + v1 +
                ", v2=" + v2 +
                '}';
    }
}
class DemoV<S> {
    private S var;

    public DemoV(S var) {
        this.var = var;
    }

    public S getVar() {
        return var;
    }

    @Override
    public String toString() {
        return "DemoV{" +
                "var=" + var +
                '}';
    }
}
public class GenDemo12 {
    public static void main(String[] args) {
        DemoV<InfoV<String,Integer>> d = new DemoV<>(new InfoV<>("啦啦啦",20));
        System.out.println(d.getVar().getV1() + " " + d.getVar().getV2());
    }
}
